#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import get_pid
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    PID = dr.get_pid(id_num=data.id_num)
    rospy.loginfo("get_pid_node: [%f, %f, %f]",PID[0], PID[1], PID[2])


def listener():
    rospy.init_node("get_pid", anonymous=True)
    rospy.Subscriber("get_pid", get_pid, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

